﻿Imports System.Data.SqlClient
Public Class Frm_DangNhap
    Dim clsdm As New Cls_DanhMuc

    Private Sub btthoat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btthoat.Click
        Me.Close()
    End Sub
    
    Private Sub btdangnhap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btdangnhap.Click

    End Sub

    Private Sub btdangnhap_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btdangnhap.MouseHover
        KetNoiSQL()
        Dim m_strTenDangNhap = txttaikhoan.Text
        Dim m_strMatMa = txtmatkhau.Text
        If (clsdm.DangNhap(m_strTenDangNhap, m_strMatMa)) Then

            Me.Close()
            'Frm_QLMain.mnu_dangnhap.Enabled = False
        Else
            MsgBox("Sai tên tài khoản hoặc mật mã", MsgBoxStyle.Exclamation, "Thông Báo")
        End If

    End Sub
End Class